package edu.zut;
//教职工类
import java.util.Scanner;
public class teacherDemo {
        public static void main(String[] args) {
            Scanner scan = new Scanner(System.in);
            int no1 = scan.nextInt();
            String name1 = scan.next();
            int age1 = scan.nextInt();
            String semi1 = scan.next();
            Teacher teacher1 = new Teacher(no1,name1,age1,semi1);
            System.out.println(teacher1);
            int no2 = scan.nextInt();
            String name2 = scan.next();
            int age2 = scan.nextInt();
            String semi2 = scan.next();
            Teacher teacher2 = new Teacher(no2,name2,age2,semi2);
            System.out.println(teacher2);
            System.out.println(teacher1.equals(teacher2));
        }
    }
    class Teacher {
        private int no;
        private String name;
        private int age;
        private String seminary;
        public Teacher(int no,String name, int age, String seminary) {
            this.no = no;
            this.name = name;
            this.age = age;
            this.seminary = seminary;
        }
        public void setNo(int n) {
            no = n;
        }
        public void setName(String na) {
            name = na;
        }
        public void setAge(int a) {
            age = a;
        }
        public void setSeminary(String s) {
            seminary = s;
        }
        public int getNo() {
            return no;
        }
        public String getName() {
            return name;
        }
        public int getAge() {
            return age;
        }
        public String getSeminary() {
            return seminary;
        }
        public boolean equals(Object o) {
            if(o == null)
            {
                return false;
            }
            else if(o instanceof Teacher)
            {
                Teacher t = (Teacher)o;
                if(this.no == t.no && this.age == t.age && this.name.equals(t.name) && this.seminary.equals(t.seminary))
                {
                    return true;
                }
            }
            return false;
        }
        public String toString() {
            return "no: "+this.no +", name:"+this.name+", age: "+this.age+", seminary: "+this.seminary;
        }
    }